﻿<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Assembly Name="NikCodes.SharePoint.ClientSide, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4c65a114af13ca0d" %>
<%@ Page Language="C#" Inherits="NikCodes.SharePoint.ClientSide.DemoPage" MasterPageFile="~/_layouts/application.master" EnableViewState="false" EnableViewStateMac="false" %>
<%@ Import Namespace="Microsoft.SharePoint" %>

<asp:Content ID="WindowTitle" runat="server" ContentPlaceHolderID="PlaceHolderPageTitle">SharePoint Client Side - jQuery UI Demo</asp:Content>
<asp:Content ID="PageTitle" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">jQuery UI Demo</asp:Content>

<asp:Content ID="DemoJQueryUIHeader" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>

<asp:Content ID="DemoJQueryUIContent" ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <div>
        <a href="../Settings.aspx">Back to SharePoint Client Side Settings</a>
        <br /><br />
    </div>
    
    <h1>Accordion</h1>
    <!-- Begin demo Accordion -->   
    <script type="text/javascript">
	    $(function() {
		    $("#accordion").accordion();
	    });
	    </script>
    <div class="demo">

        <div id="accordion">
	    <h3><a href="#">Section 1</a></h3>
	    <div>
		    <p>
		    Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
		    ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
		    amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
		    odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
		    </p>
	    </div>
	    <h3><a href="#">Section 2</a></h3>
	    <div>
		    <p>
		    Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
		    purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
		    velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
		    suscipit faucibus urna.
		    </p>
	    </div>
	    <h3><a href="#">Section 3</a></h3>
	    <div>
		    <p>
		    Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
		    Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
		    ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
		    lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
		    </p>
		    <ul>
			    <li>List item one</li>
			    <li>List item two</li>
			    <li>List item three</li>
		    </ul>
	    </div>
	    <h3><a href="#">Section 4</a></h3>
	    <div>
		    <p>
		    Cras dictum. Pellentesque habitant morbi tristique senectus et netus
		    et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
		    faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
		    mauris vel est.
		    </p>
		    <p>
		    Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
		    Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
		    inceptos himenaeos.
		    </p>
	    </div>
    </div>

    <!-- Effects Demo -->
    </div>
    <!-- End demo Accordion -->  
    
    <br /><br />
    <h1>Effects</h1>
    <!-- Begin demo Effects -->   
    <style type="text/css">
		.toggler { width: 500px; height: 200px; position: relative;}
		#button { padding: .5em 1em; text-decoration: none; }
		#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
		#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
		.ui-effects-transfer { border: 2px dotted gray; } 
	</style>
	<script type="text/javascript">
	    $(function() {

	        //run the currently selected effect
	        function runEffect() {
	            //get effect type from 
	            var selectedEffect = $('#effectTypes').val();

	            //most effect types need no options passed by default
	            var options = {};
	            //check if it's scale, transfer, or size - they need options explicitly set
	            if (selectedEffect == 'scale') { options = { percent: 0 }; }
	            else if (selectedEffect == 'transfer') { options = { to: "#button", className: 'ui-effects-transfer' }; }
	            else if (selectedEffect == 'size') { options = { to: { width: 200, height: 60} }; }

	            //run the effect
	            $("#effect").effect(selectedEffect, options, 500, callback);
	        };

	        //callback function to bring a hidden box back
	        function callback() {
	            setTimeout(function() {
	                $("#effect:hidden").removeAttr('style').hide().fadeIn();
	            }, 1000);
	        };

	        //set effect from select menu value
	        $("#button").click(function() {
	            runEffect();
	            return false;
	        });
	    });
	</script>
    <div class="demo">

    <div class="toggler">
	    <div id="effect" class="ui-widget-content ui-corner-all">
		    <h3 class="ui-widget-header ui-corner-all">Effect</h3>
		    <p>
			    Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
		    </p>
	    </div>
    </div>

    <select name="effects" id="effectTypes">
	    <option value="blind">Blind</option>
	    <option value="bounce">Bounce</option>
	    <option value="clip">Clip</option>
	    <option value="drop">Drop</option>
	    <option value="explode">Explode</option>
	    <option value="fold">Fold</option>
	    <option value="highlight">Highlight</option>
	    <option value="puff">Puff</option>
	    <option value="pulsate">Pulsate</option>
	    <option value="scale">Scale</option>
	    <option value="shake">Shake</option>
	    <option value="size">Size</option>
	    <option value="slide">Slide</option>
	    <option value="transfer">Transfer</option>
    </select>

    <a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>


</div>
    <!-- End demo Effects -->
</asp:Content>